import 'package:flutter/material.dart';

class BottomOneButton extends StatelessWidget {
  final String text;
  final Color? backgroundColor;
  final Color? textColor;
  final VoidCallback? onPressed;
  final bool strongPrompt;
  final EdgeInsets padding;
  final double? height;

  const BottomOneButton({
    Key? key,
    required this.text,
    this.textColor,
    this.backgroundColor,
    required this.onPressed,
    this.strongPrompt = true,
    this.height = 56,
    this.padding = const EdgeInsets.symmetric(horizontal: 12, vertical: 4),
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return BottomAppBar(
      child: Container(
        width: double.infinity,
        height: height,
        padding: padding,
        child: strongPrompt == true
            ? ElevatedButton(
                style: ElevatedButton.styleFrom(
                  primary: backgroundColor,
                  shape: StadiumBorder(),
                ),
                child: Text(
                  text,
                  style: TextStyle(
                    color: textColor,
                    fontSize: 15,
                  ),
                ),
                onPressed: onPressed,
              )
            : OutlinedButton(
                style: OutlinedButton.styleFrom(
                  shape: StadiumBorder(),
                  primary: backgroundColor,
                ),
                child: Text(
                  text,
                  style: TextStyle(
                    color: textColor,
                    fontSize: 15,
                  ),
                ),
                onPressed: onPressed,
              ),
      ),
    );
  }
}
